﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Jzy.BLL.SiteAdmin;
using Jzy.Model.SiteAdmin;
using System.Text;

namespace Jzy.Web.WebSite
{
    public partial class photos : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {          
            ArticleBO article = new ArticleBO();
            IEnumerable<ArticleInfo> list = article.GetDisplayListByCode(10, 11);

            StringBuilder str = new StringBuilder();
            str.Append("<?xml version='1.0'?>");
            str.Append("<photos path=''>");          
            int i = 1;
            foreach (ArticleInfo info in list)
            {
                str.Append("<photo id='photo" + i + "' name='photo" + i + "' url='" + info.SmallImageAbsPath + "' linkurl='" + info.BigImageAbsPath + "'/>");
                i++;
            }
            str.Append("</photos>");
            Response.Write(str.ToString());
            Response.End();
        }
    }
}
